Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

always use DEFLATE canonical form for huffman::table codes #100

Merged
merged 1 commit into from
Nov 21, 2023

Conversation

oliverlee
Copy link
Collaborator

@oliverlee oliverlee commented Oct 5, 2023

Update huffman::table constructors to always call canonicalize(). As
canonicalize() is now called in the constructor, this method is now
private.

Note that the table_contents constructor is an exception and does not
call canonicalize().

File decode_test.cpp does not yet update the Huffman table to use
canonical form as this requires the recalculating the encoded bits.

Change-Id: I5597dc51ea5e9f086c71e2f9396fccd5ace923b2

@oliverlee oliverlee requested a review from garymm October 5, 2023 04:42
@codecov-commenter
Copy link

codecov-commenter commented Oct 5, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2de2289) 61.90% compared to head (c72bc7d) 61.93%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #100      +/-   ##
==========================================
+ Coverage   61.90%   61.93%   +0.03%     
==========================================
  Files          16       16              
  Lines        1000     1001       +1     
==========================================
+ Hits          619      620       +1     
  Misses        381      381              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@oliverlee oliverlee force-pushed the I5597dc51ea5e9f086c71e2f9396fccd5ace923b2 branch from 47e714c to 4ed4fa6 Compare October 7, 2023 03:38
@oliverlee oliverlee force-pushed the I50f7ea63561de0bb785c85467cdb943829b65edf branch 2 times, most recently from 6a09bb7 to ec2ce26 Compare October 7, 2023 03:43
@oliverlee oliverlee force-pushed the I5597dc51ea5e9f086c71e2f9396fccd5ace923b2 branch from 4ed4fa6 to cbb5d82 Compare October 7, 2023 03:43
@garymm garymm force-pushed the I50f7ea63561de0bb785c85467cdb943829b65edf branch from ec2ce26 to efcadda Compare October 12, 2023 04:32
@garymm garymm force-pushed the I5597dc51ea5e9f086c71e2f9396fccd5ace923b2 branch from cbb5d82 to c6c647a Compare October 13, 2023 02:48
huffman/src/table.hpp Outdated Show resolved Hide resolved
@oliverlee oliverlee force-pushed the I50f7ea63561de0bb785c85467cdb943829b65edf branch from efcadda to 811d680 Compare October 18, 2023 04:56
@garymm garymm force-pushed the I50f7ea63561de0bb785c85467cdb943829b65edf branch 2 times, most recently from 57ef4a6 to ac578ee Compare October 22, 2023 03:06
Base automatically changed from I50f7ea63561de0bb785c85467cdb943829b65edf to master October 22, 2023 03:40
@oliverlee oliverlee force-pushed the I5597dc51ea5e9f086c71e2f9396fccd5ace923b2 branch from c6c647a to f387aad Compare November 20, 2023 23:34
@oliverlee oliverlee requested a review from garymm November 20, 2023 23:34
@oliverlee oliverlee enabled auto-merge (squash) November 20, 2023 23:35
@oliverlee oliverlee disabled auto-merge November 20, 2023 23:36
@oliverlee oliverlee enabled auto-merge (squash) November 20, 2023 23:36
@oliverlee oliverlee force-pushed the I5597dc51ea5e9f086c71e2f9396fccd5ace923b2 branch 2 times, most recently from e253d92 to 200b3ef Compare November 21, 2023 00:35
Update huffman::table constructors to always call canonicalize(). As
canonicalize() is now called in the constructor, this method is now
private.

Note that the table_contents constructor is an exception and does not
call canonicalize().

File decode_test.cpp does not yet update the Huffman table to use
canonical form as this requires the recalculating the encoded bits.

Change-Id: I5597dc51ea5e9f086c71e2f9396fccd5ace923b2
@oliverlee oliverlee force-pushed the I5597dc51ea5e9f086c71e2f9396fccd5ace923b2 branch from 200b3ef to c72bc7d Compare November 21, 2023 20:08
@oliverlee oliverlee requested a review from garymm November 21, 2023 20:08
@oliverlee oliverlee merged commit 12dde2c into master Nov 21, 2023
15 checks passed
@oliverlee oliverlee deleted the I5597dc51ea5e9f086c71e2f9396fccd5ace923b2 branch November 21, 2023 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants